package com.ai.bitcoin.constant;

import java.util.concurrent.TimeUnit;

public enum  RedisKeyInfo {
    WX_ACCESS_TOKEN("wx.access.token",null, TimeUnit.SECONDS),  //获取普通accesstoken

    SIGNATURE_INFO("wechat_jsapi_ticket",null,null);

    private String key;

    private String childKey;

    private Long timeout;  //过期时间

    private TimeUnit unit;

    public String key() {
        return key;
    }

    public Long timeout() {
        return timeout;
    }

    public TimeUnit unit() {
        return unit;
    }

    public String childKey() {
        return childKey;
    }

    private RedisKeyInfo(String key, Long timeout ,TimeUnit unit) {
        this.key = key;
        this.timeout = timeout;
        this.unit = unit;
    }

    private RedisKeyInfo(String key, String childKey) {
        this.key = key;
        this.childKey = childKey;
    }

    private RedisKeyInfo() {
    }

}

